#include "ObserverEvents.h"
#include "ObserverAlarm.h"
#include "ObserverDrawAlarm.h"
#include <iostream>
#include "screen.h"
#include "ConsoleEvents.h"
#include "WorkZone.h"
#include "VisitorAddObservers.h"
#include "VisitorCheckArm.h"
#include "VisitorDrawArm.h"
#include "AlarmZone.h"
#include <conio.h>
using namespace std;

void main()
{
cout<<"Targil 5 - Robot"<<endl;
cout<<"\tNavigations:"<<endl;
cout<<"\t-----------------------------"<<endl;
cout<<"\t\tUse [Mouse] To Move Angles.."<<endl;
cout<<"\t\tSwitch Between Arms: [Space] "<<endl;
cout<<"\t\tIncrease Link 1: [Down] "<<endl;
cout<<"\t\tDecrease Link 1: [Up] "<<endl;
cout<<"\t\tIncrease Link 2: [Right] "<<endl;
cout<<"\t\tDecrease Link 1: [Left] "<<endl;
cout<<"\n\t\tPress Any Key To Start...."<<endl;
getch();
scr()->cls();

AlarmZone *AZ = AlarmZone::AlarmZoneGet(20,15,60,20);

Arm a(Point(0,0) ,20,10,45  ,70   );
Arm b(Point(79,0),20,10,130,360-45);

Zone()->addArm(&a);
Zone()->addArm(&b);
Zone()->AcceptVisitor(new VisitorAddObservers());
Zone()->Attach(new ObserverAlarm());

Alarm()->Attach(new ObserverDrawAlarm());

Events()->Attach(new ObserverEvents());

while (!(Events()->bexit)) {Sleep(100); }


}